FROM openjdk:17-jdk-alpine
ENV TZ=Asia/Shanghai

ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"

RUN mkdir -p /opt/wvp/config /opt/wvp/heapdump

WORKDIR /opt/wvp

RUN COP /root/wvp-GB28181-pro/application-docker.yml /opt/wvp/config/application.yml

EXPOSE 7080
EXPOSE 5066

ADD ./target/wvp-pro.jar ./

CMD sleep 0;java $JAVA_OPTS -jar wvp-pro.jar --spring.config.location=/opt/wvp/config/application.yml